package com.Shop.Center.controller;

import com.Shop.Center.service.AdminLoginService;
import com.Shop.Center.service.AdminUserService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;

@Controller
@RequestMapping("/admin")
public class AdminUserController {
    @Resource
    private AdminUserService adminUserService;

    @ResponseBody
    @PostMapping("/regist")
    public int runRegist(@RequestParam("name") String name, @RequestParam("password") String password){
        return adminUserService.insert(name,password);
    }
}
